package com.integration.test;

import com.integration.maven.service2controllerProcessor.annotation.Dto;

import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

/**
 * @Author ckk
 * @Date 2020/12/24 10:32
 * @Description 功能描述:
 **/
// 条件判断 当前服务是user ，不需要userFeign
// @FeignClient

// 条件判断 当前服务是user ，需要 userController

//@Service2RestController(name = "user")
//@Service2FeignClient(name = "user", ignorePrefixAnnotation = {"Api"})
public interface UserService {

    public String aa = "123123";


    @PostMapping("/insertUser")
    public UserDto insertUser(
           @RequestBody UserDto userDto,
            String name);


    // dto 转发 name no
    // 添加注释 name no
    /**
     *    @PostMapping("/updateUser")
     *     public Boolean updateUser(@RequestBody UserDto userDto){
     *         return userService.updateUser(userDto.getName(),userDto.getNo() );
     *     }
     *
    */



    @ApiOperation(value = "更新用户信息", notes = "更新用户信息", response = UserDto.class)
    @PostMapping("/updateUser")
    @Dto(dtoClass = UserDto.class)
    public Boolean updateUser(String name, String no);



}
